{% extends "learning_logs/base.html" %}


{% block header %}
	<h1>所有主题</h1>
{% endblock header %}

{% block content %}
	<ul>
		{% for topic in topics %}
		<li>
			<h3>
				<a href="{% url 'learning_logs:topic' topic.id %}">{{ topic }}</a>	
			</h3>
		</li>
		{% empty %} <!-- 如果topics为空则会进入empty-->
		<li><h3>当前还没有主题,请点击去添加.</h3></li>
		{% endfor %}
	</ul>
	<!-- 添加添加主题的链接 -->
	<h3>
		<a href="{% url 'learning_logs:new_topic' %}">添加一个新主题</a>
	</h3>
{% endblock content %}